Class DeviceInfo#getExternalInputList
DeviceInfo
- Defined in: deviceInfo.js
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
DeviceInfo#getExternalInputList(successCallback, errorCallback, options)
Gets external input information.
|
Class Detail
DeviceInfo#getExternalInputList(successCallback, errorCallback, options)
Gets external input information. external input information includes inputPort, signalDetection, count and currentInputPort. (This API does not support detecting analog inputs.)
// Javascript code
function getExternalInputList () {
function successCb(cbObject) {
console.log("cbObject : " + JSON.stringify(cbObject));
for (var i = 0; i < cbObject.inputSourceList.length; i++) {
console.log("inputSourceList [" + i + "].inputPort : " + cbObject.inputSourceList[i].inputPort);
console.log("inputSourceList [" + i + "].signalDetection : " + cbObject.inputSourceList[i].signalDetection);
}
console.log("subscribed : " + cbObject.subscribed);
console.log("count : " + cbObject.count);
console.log("currentInputPort : " + cbObject.currentInputPort);
}
function failureCb(cbObject) {
var errorCode = cbObject.errorCode;
var errorText = cbObject.errorText;
console.log ("Error Code [" + errorCode + "]: " + errorText);
}
var options = { subscribe : true };
var deviceInfo = new DeviceInfo();
deviceInfo.getExternalInputList(successCb, failureCb, options);
}
- Parameters:
- {Function} successCallback
- success callback function.
- {Function} errorCallback
- failure callback function.
- options
- Since:
- 1.5
- Returns:
- {Object}
Property Type Description inputSourceList[] Array External input information. inputSourceList[].inputPort String Input label (ext://hdmi:1, ext://hdmi:2, ext://dp:1, ext://dvi:1 etc) inputSourceList[].signalDetection Boolean true: detected, false: non-detected subscribed Boolean true to indicate subscribed count Number Number of all inputs (now include only digital inputs) currentInputPort Boolean Input label of the input that is currently selected. - See: